<template>
	<div>
		<button @click="init = 'Filters'">过滤器</button>
		<button @click="init = 'Directives'">指令</button>
		<keep-alive>
			<component :is="init"></component>
		</keep-alive>
	</div>
</template>

<script>
import Filters from './Filters'
import Directives from './Directives'
export default {
	data() {
		return {
			init: 'Directives',
		}
	},
	components: {
		Filters,
		Directives,
	},
}
</script>